[3.9] [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr(...
authorPetr Viktorin <encukou@gmail.com>
Fri, 6 Sep 2024 11:13:54 +0000 (13:13 +0200)
committerAndrej Shadura <andrewsh@debian.org>
Tue, 20 Jan 2026 10:45:10 +0000 (11:45 +0100)
commit194055a245bcaecdfbaa4d845f92e6d5bde7fc67
tree0fe65e8a77d4884ca02246bae7555c55dab9a9a1
parent1a46ca433ad4c8c3fdb30891176f6a17ce5ddedc
[3.9] [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() (GH-111116) (#123769)

Detect email address parsing errors and return empty tuple to
indicate the parsing error (old API). Add an optional 'strict'
parameter to getaddresses() and parseaddr() functions. Patch by
Thomas Dwyer.

(cherry picked from commit 4a153a1d3b18803a684cd1bcc2cdf3ede3dbae19)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-Authored-By: Thomas Dwyer <github@tomd.tel>
Gbp-Pq: Name 0015-3.9-CVE-2023-27043-gh-102988-Reject-malformed-addres.patch
Doc/library/email.utils.rst
Lib/email/utils.py
Lib/test/test_email/test_email.py